package com.example.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.domain.ExportTask;
import com.example.mapper.ExportTaskMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;


/**
 * @author chenjie
 * @description 针对表【dept】的数据库操作Service实现
 * @createTime 2022-12-05 15:46:27
 */
@Service
@Slf4j
public class ReqServiceImpl extends ServiceImpl<ExportTaskMapper, ExportTask> {

    @Resource
    private ExportTaskServiceImpl exportTaskService;

    @Transactional(
            rollbackFor = {Exception.class}
    )
    public void save(List<ExportTask> list) {
        ExportTask exportTask = list.get(0);
        this.save(exportTask);
        try {
            exportTaskService.save(list);
        }catch (Exception e){
            log.info("出错了");
        }
    }
}




